/*
 * Group 3, User Interface Programming II (vt11)
 * Pooya | Flora | Monica | Can
 */
package vical.view;

//import javax.swing.JLabel;
import javax.swing.JPanel;
import java.awt.GridLayout;
import java.awt.Color;
import javax.swing.JLabel;
import vical.model.Internationalization;
import java.awt.Font;
import java.awt.FlowLayout;

/**
 * The panel that contains names of days in a week.
 * 
 * @author WoKe
 */
public class WeekBar extends JPanel {

    private JPanel[] weekDayList = {
        new JPanel(),
        new JPanel(),
        new JPanel(),
        new JPanel(),
        new JPanel(),
        new JPanel(),
        new JPanel()
    };
    private JLabel[] weekDayLabel = {
        new JLabel(Internationalization.getString("day_in_a_week_monday")),
        new JLabel(Internationalization.getString("day_in_a_week_tuesday")),
        new JLabel(Internationalization.getString("day_in_a_week_wednesday")),
        new JLabel(Internationalization.getString("day_in_a_week_thursday")),
        new JLabel(Internationalization.getString("day_in_a_week_friday")),
        new JLabel(Internationalization.getString("day_in_a_week_saturday")),
        new JLabel(Internationalization.getString("day_in_a_week_sunday"))};

    public WeekBar() {
        this.setLayout(new GridLayout(1, 7, 1, 1));
        this.setBackground(Color.WHITE);

        for (int i = 0; i < weekDayList.length; i++) {
            weekDayList[i].setLayout(new FlowLayout(FlowLayout.CENTER));
            weekDayList[i].setBackground(Color.WHITE);
            weekDayLabel[i].setFont(new Font("Default", Font.PLAIN, 10));
//            wd1.setBorder(new LineBorder(Color.WHITE, 2));
            weekDayLabel[i].setForeground(Color.DARK_GRAY);
            weekDayList[i].add(weekDayLabel[i]);
            this.add(weekDayList[i]);
        }
    }
}
